<template>
  <div>

    <el-col :span="4">
      <div class="grid-content bg-purple">
        <el-menu
            default-active="2"
            class="el-menu-vertical-demo"
            @open="handleOpen"
            @close="handleClose"
            background-color="#545c64"
            text-color="#fff"
            active-text-color="#ffd04b">
          <el-menu-item index="1">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span lot="title" @click="showComs(1)">门店管理</span>
            </template>

          </el-menu-item>

          <el-menu-item index="2">
            <i class="el-icon-s-custom"></i>
            <span slot="title" @click="showComs(2)">骑手管理</span>
          </el-menu-item>
          <el-menu-item index="3">
            <i class="el-icon-user"></i>
            <span slot="title" @click="showComs(3)">用户管理</span>
          </el-menu-item>
          <el-menu-item index="4">
            <i class="el-icon-sell"></i>
            <span slot="title" @click="showComs(4)">提现管理</span>
          </el-menu-item>
          <el-menu-item index="5">
            <i class="el-icon-setting"></i>
            <span slot="title" @click="showComs(5)">系统管理</span>
          </el-menu-item>
        </el-menu>
      </div>
    </el-col>
    <el-col :span="18">
      <div class="grid-content bg-purple-light" style="border: black solid 2px ">
        <Business v-show="show1"></Business>
        <Rider v-show="show2"></Rider>
        <User v-show="show3"></User>
        <Money v-show="show4"></Money>
        <System v-show="show5"></System>
      </div>
    </el-col>


  </div>

</template>

<script>
import Business from "../components/Business";
import Rider from "../components/Rider";
import User from "../components/User";
import Money from "../components/Money";
import System from "../components/System";

export default {
  name: "Index",
  components: {System, Money, User, Rider, Business},
  data() {
    return {
      show1: false,
      show2: false,
      show3: false,
      show4: false,
      show5: false
    }
  },
  methods: {
    showComs(tag) {
      if (tag == 1) {
        this.show1 = true
        this.show2 = false
        this.show3 = false
        this.show4 = false
        this.show5 = false
      }
      if (tag == 2) {
        this.show1 = false
        this.show2 = true
        this.show3 = false
        this.show4 = false
        this.show5 = false
      }
      if (tag == 3) {
        this.show1 = false
        this.show2 = false
        this.show3 = true
        this.show4 = false
        this.show5 = false
      }
      if (tag == 4) {
        this.show1 = false
        this.show2 = false
        this.show3 = false
        this.show4 = true
        this.show5 = false
      }
      if (tag == 5) {
        this.show1 = false
        this.show2 = false
        this.show3 = false
        this.show4 = false
        this.show5 = true
      }
    }
  }
}
</script>

<style scoped>

</style>